package com.smz.controller;

import com.smz.entity.TStaff;
import com.smz.service.TStaffService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class TStaffController {

    @Autowired
    private TStaffService tStaffService;

    @GetMapping("/staff")
    public ResponseEntity<List<TStaff>> findAllStaff(){
        return ResponseEntity.ok(tStaffService.findAllStaff());
    }
}
